# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Slash <demodevil5@yahoo.com>
# Contributor: Nathan Owe <ndowens.aur@gmail.com>
# Contributor: Christoph Zeiler <rabyte@gmail.com>

pkgname=ecm-tools
pkgver=1.03
pkgrel=3
pkgdesc='Error Code Modeler'
arch=('loong64' 'x86_64')
url='https://github.com/alucryd/ecm-tools'
license=('GPL3')
depends=('glibc')
makedepends=('git')
replaces=('ecm')
source=('git+https://github.com/alucryd/ecm-tools.git#commit=41bf9d2')
sha256sums=('SKIP')

build() {
  cd ecm-tools

  gcc $CFLAGS -O9 -Wall -Wextra -Werror -fomit-frame-pointer "ecm.c" -s -o "bin2ecm"
}

package() {
  cd ecm-tools

  install -dm 755 "${pkgdir}"/usr/bin
  install -m 755 bin2ecm "${pkgdir}"/usr/bin/
  ln -s bin2ecm "${pkgdir}"/usr/bin/ecm2bin
}

# vim: ts=2 sw=2 et:
